package com.eclipse.training.models;

import org.eclipse.core.runtime.IAdaptable;

public abstract class BaseModelElement implements IAdaptable {

	private String name;

	public BaseModelElement(String name) {
		super();
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return name;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public Object getAdapter(Class adapter) {
		if (adapter == BaseModelElement.class)
			return this;
		return null;
	}

}
